﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="ManageComponentOfPlatform.aspx.cs" Inherits="WXYW.ManageComponentOfPlatform" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="Ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    备件管理 - 平台管理 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
    关键字<asp:TextBox ID="keyWordTextBox" runat="server" Height="16px" onkeypress="enterTxtBox('searchLinkButton')"></asp:TextBox><asp:LinkButton
        ID="searchLinkButton" runat="server" OnClick="searchLinkButton_Click">查询</asp:LinkButton><asp:LinkButton
            ID="resetLinkButton" runat="server" OnClick="resetLinkButton_Click">清除</asp:LinkButton>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
    <asp:GridView ID="AccessoryListGridView" runat="server" CssClass="tableList" 
        Width="100%" AllowPaging="True" 
        AutoGenerateColumns="False" 
        OnRowCommand="AccessoryListGridView_RowCommand" 
        OnRowDataBound="AccessoryListGridView_RowDataBound"
        onpageindexchanging="AccessoryListGridView_PageIndexChanging" 
        PageSize="20" 
        onselectedindexchanged="AccessoryListGridView_SelectedIndexChanged">
        <Columns>
            <asp:TemplateField HeaderImageUrl="~/image/operateicon/button_Select.gif">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="IDLbl" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="物料号" DataField="MaterialNO">
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField HeaderText="原料型号" DataField="ModelNO">
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="原料描述">
                 <EditItemTemplate>
                     <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Description") %>'></asp:TextBox>
                 </EditItemTemplate>
                 <ItemTemplate>
                     <asp:TextBox ID="Label1" runat="server" CssClass="NOBorderTxtBox" TextMode="MultiLine"
                                    Rows="1" Text='<%# Bind("Description") %>' ReadOnly="true" Width="300px"></asp:TextBox>
                 </ItemTemplate>
                 <HeaderStyle Wrap="False" />
                 <ItemStyle HorizontalAlign="Left" Wrap="False" Width="300px" />
             </asp:TemplateField>
            <asp:BoundField HeaderText="原料分类" DataField="Class">
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:BoundField HeaderText="原料数量" DataField="Count">
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="Station" HeaderText="储存地">
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="操作" ShowHeader="False">
                <ItemTemplate>
                    <img src="image/icon_Exit.gif" alt="" />
                    <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" CommandName="Transfer"
                        Text="转储" CommandArgument='<%#Eval("ID") %>'></asp:LinkButton>
                    <img src="image/operateicon/docview.gif" alt="" />
                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="Detail"
                        Text="查看" CommandArgument='<%#Eval("ID") %>'></asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
        </Columns>
        <PagerTemplate>
            本类记录<span style="color: Red"><%= AccessoryListGridView.PageSize * AccessoryListGridView.PageCount%></span>条,
            <span style="color: Red">20</span>条/页 当前 <span style="color: Red">
                <%= AccessoryListGridView.PageIndex + 1%>/<%= AccessoryListGridView.PageCount%></span>页
            <asp:LinkButton CommandName="Page" CommandArgument="First" ID="LinkButton1" runat="server"
                Style="color: blue">首页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Prev"
                    ID="LinkButton2" runat="server" Style="color: blue">|上一页</asp:LinkButton>
            <asp:LinkButton CommandName="Page" CommandArgument="Next" ID="LinkButton3" runat="server"
                Style="color: blue">下一页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Last"
                    ID="LinkButton4" runat="server" Style="color: blue">|尾页</asp:LinkButton>
            转到<asp:DropDownList ID="pageDDL" runat="server" AutoPostBack="True" OnSelectedIndexChanged="pageDDL_SelectedIndexChanged">
            </asp:DropDownList>
        </PagerTemplate>
        <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#A55129"></HeaderStyle>
    </asp:GridView>
    <table width="100%" style="line-height:30px; color:Red">
        <asp:Label ID="MsgLbl" runat="server"></asp:Label>
    </table>
    <asp:HiddenField ID="HideTransferAccessoryButton" runat="server" />
    <Ajax:ModalPopupExtender ID="TransferAccessoryModalPopupExtender" TargetControlID="HideTransferAccessoryButton"
        PopupControlID="TransferAccessoryPanel" BackgroundCssClass="modalBackground"
        runat="server" Drag="true" PopupDragHandleControlID="TransferDragBar" CancelControlID="CloseLnkBtn">
    </Ajax:ModalPopupExtender>
    <asp:Panel ID="TransferAccessoryPanel" CssClass="modalPopup" Width="600px" runat="server"
        DefaultButton="SaveLnkBtn">
        <!-- Header -->
        <div class="box-header" id="TransferDragBar">
            <img src="image/stdBox_left_top.gif" alt="" />
            <h2>
                转储元器件</h2>
        </div>
        <div class="functionPanel">
            <table width="100%" style="line-height: 30px">
                <tr style="text-align: right">
                    <td colspan="4">
                        <img src="image/operateicon/check.gif" alt="" />
                        <asp:LinkButton ID="SaveLnkBtn" runat="server" Text="保存" OnClick="SavePriceLnkBtn_Click"
                            ValidationGroup="AccessoryValidation"></asp:LinkButton>
                        <img src="image/cancel.gif" alt="" />
                        <asp:LinkButton ID="CloseLnkBtn" runat="server" Text="关闭"></asp:LinkButton>
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%">
                        原料型号:
                    </td>
                    <td style="width: 40%">
                        <asp:TextBox ID="ModelNOTxtBox" runat="server" Enabled="false" Width="90%"></asp:TextBox>
                    </td>
                    <td style="width: 5%">
                    </td>
                    <td style="width: 40%">
                    </td>
                </tr>
                <tr>
                    <td>
                        库存数量:
                    </td>
                    <td>
                        <asp:TextBox ID="CurrentCountTxtBox" runat="server" Enabled="false" Width="50%"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                        转储数量:
                    </td>
                    <td>
                        <asp:TextBox ID="TransferCountTxtBox" runat="server" Width="50%"></asp:TextBox>
                    </td>
                    <td style="color: Red">
                        *
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="CountRequiredFieldValidator" runat="server" ErrorMessage=""
                            Display="Static" Text="请输入合法的转储数量" ControlToValidate="TransferCountTxtBox" ValidationGroup="AccessoryValidation"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="CountRegularExpressionValidator" runat="server"
                            ErrorMessage="" Text="请输入合法的转储数量" ValidationExpression="^[0-9]+$" ControlToValidate="TransferCountTxtBox"
                            ValidationGroup="AccessoryValidation"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        转储方式:
                    </td>
                    <td>
                        <asp:DropDownList ID="TransferTypeDDL" runat="server" Width="50%">
                            <asp:ListItem Text="消耗" Value="消耗"></asp:ListItem>
                            <asp:ListItem Text="-> 北京平台" Value="-> 北京平台"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                        备注:
                    </td>
                    <td>
                        <asp:TextBox ID="CommentTxtBox" runat="server" Width="90%"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                        转储日期:
                    </td>
                    <td>
                        <%= DateTime.Now.ToString("yyyy-MM-dd") %>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </div>
        <div class="box-footer">
            <img alt="" src="image/stdBox_left_bottom.gif" />
            <p>
                &nbsp;</p>
        </div>
    </asp:Panel>
</asp:Content>
